﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Diagnostics;
using System.Linq;
using System.ServiceModel;
using System.ServiceProcess;
using System.Text;
using MobFlash;
using System.ServiceModel.Description;
using Common.errLog;

namespace MobFlash.Host
{
    public partial class Service : ServiceBase
    {
        public Service()
        {
            InitializeComponent();
        }

        protected override void OnStart(string[] args)
        {
            errlog.errorlog(new Exception("正在启动……"), Common.Model.LogType.Information);
            ServiceHost host = new ServiceHost(typeof(Operation));
            host.Open();
            Console.Read();
            Console.WriteLine("WCF服务已经启动");
        }
        protected override void OnStop()
        {
            errlog.errorlog(new Exception("正在停止……"), Common.Model.LogType.Information);
        }
    }
}
